tination_dir=$1
shift

# 判断目标目录是否存在，不存在则创建
if [ ! -d "$destination_dir" ]; then
  mkdir "$destination_dir"
elif [ -f "$destination_dir" ]; then
  rm "$destination_dir"
  mkdir "$destination_dir"
else
  rm -rf "$destination_dir"/*
fi

# 复制普通文件到目标目录
for file in "$@"; do
  if [ -f "$file" ]; then
    cp "$file" "$destination_dir"
  fi
done

echo "文件复制完成！"

